#define _CRT_SECURE_NO_WARNINGS 1
#include "SList.h"
void SLPrint(SLNode* phead) {
	SLNode* pcur = phead;
	while(pcur!=NULL) {
		printf("%d ->", pcur->data);
		pcur=pcur->next;
	}
	printf("NULL\n");
}
SLNode* SLBuyBack( SLDataType x) {
	  SLNode* node = (SLNode*)malloc(sizeof(SLNode));
	  node->data = x;
	  node->next = NULL;
	  return node;
}
void SLPushBack(SLNode** pphead,SLDataType x) {
	SLNode* node = SLBuyBack(x);
	if (*pphead == NULL) {
		*pphead = node;
		return;
	}
	SLNode* pcur = *pphead;
	while (pcur->next) {
		pcur = pcur->next;
	}
	pcur->next = node;
}